package cn.shutdown.demo.thread.synchronize01;

/**
 * @author jiangwujie
 * @date 2021/8/4
 */
public class LoginServlet {

    public static String usernameRef;

    public static String passwordRef;

    public static void doPost(String username, String password) {
        usernameRef = username;
        if (username.equals("aa")) {
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        passwordRef = password;
        System.out
                .println("Thread:" + Thread.currentThread() + " username:" + usernameRef + ", password:" + passwordRef);
    }

}
